
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<style type="text/css">
#div1{width:400px; height:200px; background-color:red;  position:relative; display:none;}
span{width:30px; height:30px; display:block; position:absolute; right:5px; top:5px; border:1px #000 solid; border-radius:50%; text-align:center; line-height:30px; font-size:28px; cursor:pointer;}
</style>
</head>
<body>
<div id="div1"><span>X</span></div>
<script>
var oDiv = document.getElementById("div1");
var oSpan = document.getElementsByTagName("span")[0];
oSpan.onclick = function (){
	oDiv.style.display = "none";
}
setTimeout(function (){
	oDiv.style.display = "block";
	setTimeout(function (){
		oDiv.style.display = "none";
	},3000)
},2000)
</script>
</body>
</html>
